Retrieve Products by ID
GET /api/v1/Products/:id
Description
This endpoint allows retrieving a specific product by its ID.
Headers:
- No specific headers are required.
Path Parameters:
-
version: The version of the API. -
id: The unique identifier of the product.
URL:
- GET:
/api/v1/Products/{id}
Response:
- 200: Success, returns a product response.
Error Codes:
-
400: Bad request, the request is not valid.
-
404: Not found, the product does not exist or is invalid.
-
500: Internal server error, something went wrong while processing the request.
Example Response:
HTTP/1.1 200 OK
{
"id": "123",
"name": "Product1",
"description": "Description of Product1",
"price": 100.00,
"categoryId": "abc123",
"imageUrl": "https://example.com/product1.jpg",
"availability": true,
"createdAt": "2024-02-16T12:00:00Z",
"updatedAt": "2024-02-17T12:00:00Z"
}
Method: GET
/api/v1/Products/:id
Headers
| Content-Type | Value |
|---|---|
| Accept | text/plain |
Response: 200
{
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": {
"id": "<uuid>",
"merchantId": "<uuid>",
"name": "<string>",
"number": "<string>",
"description": "<string>",
"salesPrice": "<double>",
"documents": [
{
"id": "<uuid>",
"externalId": "<uuid>",
"url": "<string>",
"name": "<string>"
},
{
"id": "<uuid>",
"externalId": "<uuid>",
"url": "<string>",
"name": "<string>"
}
]
}
}
LANGUAGE
CURL REQUEST
curl --request GET \
--url /api/v1/Products/:id \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!